package com.qfedu.mall.mapper;


import com.qfedu.mall.beans.entity.Product;
import com.qfedu.mall.beans.entity.ProductDetail;
import com.qfedu.mall.beans.entity.ProductSku;
import com.qfedu.mall.beans.vo.ProductCommentsVo;
import com.qfedu.mall.beans.vo.ProductSkuVO;
import com.qfedu.mall.beans.vo.ProductVO;
import com.qfedu.mall.common.vo.PinVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;


@Repository
public interface ProductMapper extends Mapper<Product>, MySqlMapper<Product> {

    List<Product> seleProductByCate(@Param("cate") Integer category);

    public  List<PinVo> selectAllShareBill();
    List<Product> seleProductBypid(@Param("id") Integer pid);

    List<ProductCommentsVo>selecommentsBypid(@Param("pid") Integer pid);

    ProductDetail selectShopDetail();

    List<ProductSku> selectSkuBypid(@Param("pid") Integer pid);
    int insertProduct(ProductVO productVO);

    List<ProductVO> getProductAll();

    int deleteProductB(@Param("pid")Integer pid);

    int updateProduct(ProductVO productVO);

    int deleteProductSku(@Param("sid")Integer sid);

    List<ProductSkuVO> getProductSKUAll();

    int updateProductSku(ProductSkuVO productSkuVO);

    int insertProductSku(ProductSkuVO productSkuVO);

}